package br.mikhas.task;

public enum Status {
	/**
	 * Task has not been started
	 */
	Open(false),
	/**
	 * Task is done
	 */
	Done(true),
	/**
	 * Task is in progress
	 */
	InProgress(false),
	/**
	 * Task execution has been canceled
	 */
	Canceled(true);

	/**
	 * Flags if this status is final state
	 */
	protected boolean finalState = false;

	private Status(boolean finalState) {
		this.finalState = finalState;
	}

	/**
	 * @return the finalState
	 */
	public boolean isFinalState() {
		return finalState;
	}

	@Override
	public String toString() {
		return name();
	}

}
